<template>
  <u-popup
      :show="popupShow"
      :height="height"
      @close="close"
      ref="ktPopup">
    <view class="box">
      <view style="height: 20rpx"></view>
      <view class="title">
        {{$i18n.zhToGlobal("用户名片")}}
      </view>
      <view style="height: 20rpx"></view>
      <user-account-interrelation-panel
          :height="'calc('+height+' - '+'100rpx)'"
          @select="select"
          :user-account-id="$kt.userAccount.getSelf().id"
      ></user-account-interrelation-panel>
    </view>
  </u-popup>
</template>

<script>
export default {
  props: {
    height: {
      type: String,
      default: "calc(100vh - 300rpx)"
    }
  },
  data(){
    return {
      popupShow:false
    }
  },
  methods: {
    select(userAccount){
      this.$emit("select",userAccount);
      this.close();
    },
    open(){
      this.popupShow = true;
    },
    close(){
      this.popupShow = false;
    },
  }
}
</script>

<style lang="scss" scoped>
.box {
  width: 100%;
  height: 100%;
  background-color: #fff;
  border-radius: 20rpx;
  padding: 20rpx;
  box-sizing: border-box;

  .title {
    font-size: 32rpx;
    color: #333;
    font-weight: bold;
    margin-bottom: 20rpx;
    text-align: center;
  }
}
</style>